package com.example.mall.dto.validator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * 自定义 - token-password-校验参数-注解
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE, ElementType.FIELD })
@Constraint(validatedBy = TokenPassowrdValidator.class)
public @interface TokenPassword {
    String message() default "{default}";
    int min() default 6;
    int max() default 32;

    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};
}
